import math
from swampy.TurtleWorld import *
world = TurtleWorld()
bob = Turtle()

'''
for i in range(4):
    fd(bob, 100)
    lt(bob)
'''

def square(t, length):
    for i in range(4):
        fd(t, length)
        lt(t)

def polygon(t, length, n):
    for i in range(n):
        fd(t, length)
        lt(t, 360/n)

def circle(t, r):
    circumference = 2 * math.pi * r
    n = 50
    length = circumference / n
    polygon(t, length, n)

#square(bob, 150)
#polygon(bob, 100, 6)

circle(bob, 20)
